package com.tedu.cn;

import com.tedu.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringMain_B {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        User user = (User) applicationContext.getBean("xiaoming");
        user.setName("z这是第一个Spring创建的，你可以使用哦");
        System.out.println(user.getName());

    }


}

